/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VOL.Entity.SystemModels;

namespace VOL.Entity.DomainModels
{
    [Entity(TableCnName = "工单维护",TableName = "PLAN_WORK_ORDER")]
    public partial class PLAN_WORK_ORDER:BaseEntity
    {
        /// <summary>
       ///Order_Id
       /// </summary>
       [Key]
       [Display(Name ="Order_Id")]
       [Column(TypeName="uniqueidentifier")]
       [Editable(true)]
       [Required(AllowEmptyStrings=false)]
       public Guid Order_Id { get; set; }

       /// <summary>
       ///工单号
       /// </summary>
       [Display(Name ="工单号")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string OrderCode { get; set; }

       /// <summary>
       ///模具&产品
       /// </summary>
       [Display(Name ="模具&产品")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProductId { get; set; }

       /// <summary>
       ///工作中心
       /// </summary>
       [Display(Name ="工作中心")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string WorkCenterId { get; set; }

       /// <summary>
       ///模具&产品BOM
       /// </summary>
       [Display(Name ="模具&产品BOM")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProductBOMId { get; set; }

       /// <summary>
       ///项目编码
       /// </summary>
       [Display(Name ="项目编码")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProjectCode { get; set; }

       /// <summary>
       ///工艺路线
       /// </summary>
       [Display(Name ="工艺路线")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string ProcessRouteId { get; set; }

       /// <summary>
       ///工单类型
       /// </summary>
       [Display(Name ="工单类型")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string OrderType { get; set; }

       /// <summary>
       ///工单数量
       /// </summary>
       [Display(Name ="工单数量")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? OrderQuantity { get; set; }

       /// <summary>
       ///工单序号
       /// </summary>
       [Display(Name ="工单序号")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string work_order_number { get; set; }

       /// <summary>
       ///计划开始时间
       /// </summary>
       [Display(Name ="计划开始时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? PlanStart { get; set; }

       /// <summary>
       ///计划结束时间
       /// </summary>
       [Display(Name ="计划结束时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? PlanEnd { get; set; }

       /// <summary>
       ///置顶序号
       /// </summary>
       [Display(Name ="置顶序号")]
       [Column(TypeName="int")]
       public int? TopUpSort { get; set; }

       /// <summary>
       ///加工机台
       /// </summary>
       [Display(Name ="加工机台")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string processing_machines { get; set; }

       /// <summary>
       ///版本
       /// </summary>
       [Display(Name ="版本")]
       [MaxLength(5)]
       [Column(TypeName="nvarchar(5)")]
       [Editable(true)]
       public string Version { get; set; }

       /// <summary>
       ///排产序号
       /// </summary>
       [Display(Name ="排产序号")]
       [DisplayFormat(DataFormatString="18,2")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? ProductionSeqNumber { get; set; }

       /// <summary>
       ///是否排产
       /// </summary>
       [Display(Name ="是否排产")]
       [MaxLength(10)]
       [Column(TypeName="nvarchar(10)")]
       public string IsProduction { get; set; }

       /// <summary>
       ///描述
       /// </summary>
       [Display(Name ="描述")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string Description { get; set; }

       /// <summary>
       ///工单生产状态
       /// </summary>
       [Display(Name ="工单生产状态")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? process_Status { get; set; }

       /// <summary>
       ///工单状态
       /// </summary>
       [Display(Name ="工单状态")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string Status { get; set; }

       /// <summary>
       ///优先等级：1，2，3，4
       /// </summary>
       [Display(Name ="优先等级：1，2，3，4")]
       [Column(TypeName="int")]
       [Editable(true)]
       public int? priority { get; set; }

       /// <summary>
       ///材料表id
       /// </summary>
       [Display(Name ="材料表id")]
       [Column(TypeName="int")]
       public int? material_id { get; set; }

       /// <summary>
       ///粗加工：1，半精加工：3，精加工：5
       /// </summary>
       [Display(Name ="粗加工：1，半精加工：3，精加工：5")]
       [Column(TypeName="int")]
       public int? processing_grade { get; set; }

       /// <summary>
       ///长度
       /// </summary>
       [Display(Name ="长度")]
       [Column(TypeName="decimal")]
       public decimal? length { get; set; }

       /// <summary>
       ///宽度
       /// </summary>
       [Display(Name ="宽度")]
       [Column(TypeName="decimal")]
       public decimal? width { get; set; }

       /// <summary>
       ///高度
       /// </summary>
       [Display(Name ="高度")]
       [Column(TypeName="decimal")]
       public decimal? height { get; set; }

       /// <summary>
       ///打表程序名-DB
       /// </summary>
       [Display(Name ="打表程序名-DB")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string measure_number { get; set; }

       /// <summary>
       ///分中程序名-FZ
       /// </summary>
       [Display(Name ="分中程序名-FZ")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string centring_number { get; set; }

       /// <summary>
       ///放平程序名-FP
       /// </summary>
       [Display(Name ="放平程序名-FP")]
       [MaxLength(255)]
       [Column(TypeName="nvarchar(255)")]
       public string make_level_number { get; set; }

       /// <summary>
       ///精度
       /// </summary>
       [Display(Name ="精度")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       [Editable(true)]
       public decimal? accuracy { get; set; }

       /// <summary>
       ///创建人
       /// </summary>
       [Display(Name ="创建人")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string CreateBy { get; set; }

       /// <summary>
       ///创建时间
       /// </summary>
       [Display(Name ="创建时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? CreateOn { get; set; }

       /// <summary>
       ///更新人
       /// </summary>
       [Display(Name ="更新人")]
       [MaxLength(30)]
       [Column(TypeName="nvarchar(30)")]
       [Editable(true)]
       public string UpdateBy { get; set; }

       /// <summary>
       ///更新时间
       /// </summary>
       [Display(Name ="更新时间")]
       [Column(TypeName="datetime")]
       [Editable(true)]
       public DateTime? LastUpdateOn { get; set; }

       /// <summary>
       ///逻辑删除 0/不删除 1/已删除
       /// </summary>
       [Display(Name ="逻辑删除 0/不删除 1/已删除")]
       [Column(TypeName="bit")]
       [Editable(true)]
       public bool? IsDeleted { get; set; }

       /// <summary>
       ///工件id(外键)
       /// </summary>
       [Display(Name ="工件id(外键)")]
       [Column(TypeName="int")]
       [Required(AllowEmptyStrings=false)]
       public int workpiece_id { get; set; }

       /// <summary>
       ///工单激活 1 激活
       /// </summary>
       [Display(Name ="工单激活 1 激活")]
       [MaxLength(2)]
       [Column(TypeName="nvarchar(2)")]
       public string IsActivation { get; set; }

       /// <summary>
       ///是否置顶
       /// </summary>
       [Display(Name ="是否置顶")]
       [Column(TypeName="bit")]
       public bool? IsTopUp { get; set; }

       /// <summary>
       ///加工类型
       /// </summary>
       [Display(Name ="加工类型")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string process_type { get; set; }

       /// <summary>
       ///加工重量
       /// </summary>
       [Display(Name ="加工重量")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       public decimal? ProcessWeight { get; set; }

       /// <summary>
       ///图
       /// </summary>
       [Display(Name ="图")]
       [MaxLength(500)]
       [Column(TypeName="nvarchar(500)")]
       public string Img { get; set; }

       /// <summary>
       ///执行开始时间
       /// </summary>
       [Display(Name ="执行开始时间")]
       [Column(TypeName="datetime")]
       public DateTime? ExecuteStart { get; set; }

       /// <summary>
       ///执行结束时间
       /// </summary>
       [Display(Name ="执行结束时间")]
       [Column(TypeName="datetime")]
       public DateTime? ExecuteEnd { get; set; }

       /// <summary>
       ///执行时间
       /// </summary>
       [Display(Name ="执行时间")]
       [Column(TypeName="int")]
       [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
       public int? ExecuteOrderTime { get; set; }

       /// <summary>
       ///工件硬度
       /// </summary>
       [Display(Name ="工件硬度")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       public decimal? MaterialHardness { get; set; }

       /// <summary>
       ///刀具硬度
       /// </summary>
       [Display(Name ="刀具硬度")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       public decimal? TollHardness { get; set; }

       /// <summary>
       ///使用工具
       /// </summary>
       [Display(Name ="使用工具")]
       [Column(TypeName="int")]
       public int? UsedToolCount { get; set; }

       /// <summary>
       ///使用工具总数
       /// </summary>
       [Display(Name ="使用工具总数")]
       [Column(TypeName="int")]
       public int? UsedToolTotal { get; set; }

       /// <summary>
       ///
       /// </summary>
       [Display(Name ="work_order_id")]
       [Column(TypeName="int")]
       [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
       [Required(AllowEmptyStrings=false)]
       public int work_order_id { get; set; }

       /// <summary>
       ///累计程序加工时间
       /// </summary>
       [Display(Name ="累计程序加工时间")]
       [Column(TypeName="decimal")]
       public decimal? ProcessingTime { get; set; }

       /// <summary>
       ///加工中序号
       /// </summary>
       [Display(Name ="加工中序号")]
       [Column(TypeName="decimal")]
       public decimal? ProcessingNumber { get; set; }

       /// <summary>
       ///材质类型
       /// </summary>
       [Display(Name ="材质类型")]
       [MaxLength(20)]
       [Column(TypeName="nvarchar(20)")]
       public string ProcessingMaterial { get; set; }

       /// <summary>
       ///材料精度
       /// </summary>
       [Display(Name ="材料精度")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string process_precision { get; set; }

       /// <summary>
       ///刀柄类型
       /// </summary>
       [Display(Name ="刀柄类型")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string HolderType { get; set; }

       /// <summary>
       ///转速
       /// </summary>
       [Display(Name ="转速")]
       [DisplayFormat(DataFormatString="18,3")]
       [Column(TypeName="decimal")]
       public decimal? RotationalSpeed { get; set; }

       /// <summary>
       ///父工单
       /// </summary>
       [Display(Name ="父工单")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       [Editable(true)]
       public string FatherOrderCode { get; set; }

       /// <summary>
       ///子工单
       /// </summary>
       [Display(Name ="子工单")]
       [MaxLength(50)]
       [Column(TypeName="nvarchar(50)")]
       public string SubOrderCode { get; set; }

       /// <summary>
       ///sql异常
       /// </summary>
       [Display(Name ="sql异常")]
       [MaxLength(500)]
       [Column(TypeName="nvarchar(500)")]
       [Editable(true)]
       public string ErrorMeg { get; set; }

       /// <summary>
       ///是否生成时异常
       /// </summary>
       [Display(Name ="是否生成时异常")]
       [Column(TypeName="bit")]
       [Editable(true)]
       public bool? IsErrorMeg { get; set; }

       
    }
}